/PROG  PNS0002
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0284490  OK";
PROG_SIZE	= 3334;
CREATE		= DATE 22-06-05  TIME 08:36:36;
MODIFIED	= DATE 25-04-29  TIME 17:17:16;
FILE_NAME	= PNS0073;
VERSION		= 0;
LINE_COUNT	= 119;
MEMORY_SIZE	= 3794;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0005 ;
   7:  !  PART:P0284490 ;
   8:  !2022.6.5************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=75    ;
  14:  R[18]=1    ;
  15:  R[19]=.1    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:   ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  PAUSE ;
  29:  R[1]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1]=R[1]+1    ;
  39:  R[2]=TIMER[2]    ;
  40:  R[3]=60/R[2]    ;
  41:  R[8]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  49:  IF DI[29]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  54:  TIMER[3]=START ;
  55:  OVERRIDE=R[5] ;
  56:J P[3:PICK APPROACH] 100% CNT50 ACC100    ;
  57:   ;
  58:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  59:  PAYLOAD[4] ;
  60:  CALL CHK_PICK    ;
  61:  MONITOR Z_CHECH ;
  62:J P[5:PICK DEPART] 100% CNT80 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  63:  DO[8]=PULSE,1.0sec ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  67:   ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:  LBL[30:GOTO DROP POUNCE] ;
  70:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  71:  TIMER[3]=STOP ;
  72:  LBL[40:AT DROP POUNCE] ;
  73:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  74:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  75:  IF DI[18]=ON,JMP LBL[60] ;
  76:  JMP LBL[40] ;
  77:   ;
  78:  LBL[50:MOVE DROP SNEAK] ;
  79:  TIMER[3]=START ;
  80:  OVERRIDE=R[5] ;
  81:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  84:  IF DI[18]=ON,JMP LBL[40] ;
  85:  JMP LBL[51] ;
  86:  JMP LBL[50] ;
  87:   ;
  88:  LBL[60:MOVE CLS-PRS-ACC] ;
  89:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  90:  PAUSE ;
  91:  JMP LBL[30] ;
  92:   ;
  93:  LBL[80:DROP ENABLED] ;
  94:  !PROCEED TO DROP ;
  95:  TIMER[3]=START ;
  96:  OVERRIDE=R[5] ;
  97:J P[10:DROP APPROACH] 100% CNT60 ACC100    ;
  98:  MONITOR END Z_CHECH ;
  99:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
 100:  DO[6]=PULSE,1.0sec ;
 101:  PAYLOAD[3] ;
 102:  CALL CHK_DROP    ;
 103:   ;
 104:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7]=PULSE,1.0sec    ;
 105:   ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 107:   ;
 108:  !GOTO PICK POUNCE ;
 109:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 110:  IF DI[29]=ON,JMP LBL[90] ;
 111:  JMP LBL[10] ;
 112:   ;
 113:  LBL[90:END OF CYCLE] ;
 114:  TIMER[1]=STOP ;
 115:  R[4]=TIMER[1]    ;
 116:J P[1:MIDDLE] 50% CNT100    ;
 117:  MOVE TO HOME    ;
 118:   ;
 119:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1251.280  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2105.212  mm,	Y =  1622.912  mm,	Z =  -913.153  mm,
	W =   179.250 deg,	P =      .620 deg,	R =   144.581 deg,
	E1=   141.990 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2656.611  mm,	Y =  3162.104  mm,	Z =  -753.151  mm,
	W =   179.383 deg,	P =     -.647 deg,	R =    89.760 deg,
	E1=   196.424 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2656.377  mm,	Y =  3152.025  mm,	Z =  -965.606  mm,
	W =   179.375 deg,	P =     1.206 deg,	R =    89.759 deg,
	E1=   196.424 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2656.611  mm,	Y =  3162.104  mm,	Z =  -797.150  mm,
	W =   179.383 deg,	P =     -.647 deg,	R =    89.760 deg,
	E1=   196.424 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2127.670  mm,	Y =  1747.575  mm,	Z =  -868.306  mm,
	W =   179.206 deg,	P =      .543 deg,	R =   141.529 deg,
	E1=   145.041 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2050.218  mm,	Y = -1223.864  mm,	Z =  -876.687  mm,
	W =  -178.974 deg,	P =      .706 deg,	R =  -151.848 deg,
	E1=    78.373 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2301.549  mm,	Y = -2318.052  mm,	Z =  -927.531  mm,
	W =  -177.628 deg,	P =    -1.659 deg,	R =  -125.486 deg,
	E1=    51.800 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2646.815  mm,	Y = -3355.140  mm,	Z =  -987.922  mm,
	W =   179.632 deg,	P =    -5.398 deg,	R =   -90.111 deg,
	E1=    16.287 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2646.942  mm,	Y = -3355.238  mm,	Z = -1119.106  mm,
	W =   179.632 deg,	P =    -5.399 deg,	R =   -90.111 deg,
	E1=    16.287 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2646.817  mm,	Y = -3355.141  mm,	Z = -1048.322  mm,
	W =   179.632 deg,	P =    -5.398 deg,	R =   -90.111 deg,
	E1=    16.287 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2126.270  mm,	Y = -1682.541  mm,	Z =  -966.499  mm,
	W =  -178.758 deg,	P =      .381 deg,	R =  -140.801 deg,
	E1=    67.319 deg
};
/END
